<?php

class Maps_Map_POIManager extends Maps_Collection {
  
  /**
   * Class constructor
   * @param   String  Optional item Id prefix
   * @param   String  Optional Id for this manager
   * @return  void
   */
  public function __construct($prefix=null, $id='') {
    if ( empty($prefix) ) {
      $prefix = 'poi_';
    }
    parent::__construct($prefix, $id);
  }
  
  /**
   * Adds a point of interest to this collection.
   * @param   Maps_Map_POI  Point Of Interest object
   * @return  string        Id for this point of interest
   */
  public function add(Maps_Map_POI $poi) {
    return $this->addItem($poi);
  }
  
  /**
   * Creates an new Point Of Interest object
   * @param   Maps_LatLng   Latitude/longitude object
   * @param   string        Name text for this point of interest
   * @param   string        Icon name
   * @return  Maps_Map_POI  New Point Of Interest object
   */
  public function create(Maps_LatLng $latlng, $name, $iconName='') {
    return new Maps_Map_POI($latlng, $name, $iconName);
  }
  
}

?>